﻿@namespace MudBlazor
@inherits MudBaseButton

<MudElement @bind-Ref="@_elementReference"
            HtmlTag="@HtmlTag"
            Class="@Classname" 
            Style="@Style"
            @attributes="UserAttributes" 
            @onclick="OnClickHandler"
            type="@ButtonType.ToDescriptionString()" 
            href="@Href" 
            target="@Target"
            rel="@GetRel()"
            disabled="@GetDisabledState()"
            title="@Title"
            ClickPropagation="@ClickPropagation">
    @if (!string.IsNullOrEmpty(Icon))
    {
        <span class="mud-icon-button-label">
            <MudIcon Icon="@Icon" Size="@Size" />
        </span>
    }
    else
    {
        <MudText Typo="Typo.body2" Color="Color.Inherit">@ChildContent</MudText>
    }
</MudElement>